package Quene;

public class wiringTest {
    public static void main(String[] args) {
        //初始化电路板的布局
        int[][] circuit = {{0,0,-1,0,0,0,0},
                {0,0,-1,-1,0,0,0},
                {0,0,0,0,-1,0,0},
                {0,0,0,-1,-1,0,0},
                {-1,0,0,0,-1,0,0},
                {-1,-1,-1,0,0,0,0},
                {-1,-1,-1,0,0,0,0}};
        wiring w = new wiring();
        try {
            //先初始化电路板所有的步距
            System.out.println(w.Solution(new Point(2, 1), new Point(3, 5), circuit));
            System.out.println("-------------------------------");
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("电路板的布局为");
        for(int[] i:circuit){
            for (int j:i){
                System.out.printf("%4d",j>=1?j-1:j);
            }
            System.out.println();
        }
        //通过回溯算法找到相应路径并输出路径
    }
}
